<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="./react.js"></script>
    <script src="./react-dom.js"></script>
    <script src="./browser.min.js"></script>
</head>
<body>
    <div id="example"></div>


    <script type="text/babel">
        var LikeButton = React.createClass({
            getInitialState : function () {
                return {like : false};
            },
            pClick : function () {
                this.setState({like : !this.state.like});
            },
            render : function () {
                var text = this.state.like ? "like" : "haven\'t like";

                return <p onClick={this.pClick}>
                    You {text} this. Click to toggle.
                </p>;
            }
        });




        ReactDOM.render(<LikeButton/>,document.getElementById("example"));
    </script>


</body>
</html>